<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>07固定定位</title>
  <style>
    .fu{
      background-color: yellow;

    }
    .fu>div{
      width: 100px;
      height: 100px;
    }
    .z1{
      background-color: red;
      position: fixed;/*固定定位参照物永远是浏览器窗口*/
      top: 0;
      left: 0;
    }
    .z2{
      background-color: green;

    }
    .z3{
      background-color: blue;

    }
  </style>
</head>
<body>
<div class="fu">
  <div class="z1"></div>
  <div class="z2"></div>
  <div class="z3"></div>
</div>
</body>
</html>